﻿$(function(){
	var id;
	var nickname;
	var avatar;
	var wechat;
	var phone;
	var qr_code;
	console.log("token:" + localStorage.getItem("token"));
	$.ajax({
			type: "POST",
			url: "http://yx.fxtourong.com/V1/Member/getMemberInfo",
			data: {
				token : localStorage.getItem("token")
			},
			dataType: "json",
			success: function(data) {
				console.log(data);
				var code = data.code;
				console.log(code);
				if(code == "1") {
					console.log("成功获取个人信息");
					id = data.data.id;
					nickname = data.data.nickname;
					avatar = data.data.avatar;
					wechat = data.data.wechat;
					phone = data.data.phone;
					qr_code = data.data.qr_code;
					console.log("头像:" + avatar);
					$("#personimage").attr('src',avatar);
					$("#person_nick_name").text(nickname);
					$("#person_phone").text(phone);
				} 
			}
		});
});